﻿using System;
using System.Data;
using System.Configuration;
using System.Web;

using System.Globalization;

namespace ZLDC.Common
{
    public class C_DateChangeWeek
    {
        public C_DateChangeWeek()
        {
        }

        public static string GetWeekNo(string sInputDate)
        {
            DateTime InputDate = Convert.ToDateTime(sInputDate);

            CultureInfo myCI = new CultureInfo("zh-TW");

            System.Globalization.Calendar myCal = myCI.Calendar;

            CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;

            DayOfWeek myFirstDOW = DayOfWeek.Sunday;

            int i = myCal.GetWeekOfYear(InputDate, myCWR, myFirstDOW);
            return i.ToString();
        }
    }
}
